//
//  CollectView.m
//  intelligent
//
//  Created by 甘世清 on 2024/2/25.
//

#import "CollectView.h"

@implementation CollectView

- (void)SQ_UIViewForSelfView{
    UIImageView * image = [[UIImageView alloc]init];
    image.image = SQGetImage(@"提示背景");
    image.contentMode = UIViewContentModeScaleAspectFill;
    [self addSubview:image];
    [image mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self);
    }];
    UIImageView * image1 = [[UIImageView alloc]init];
    image1.image = SQGetImage(@"提示");
    image1.contentMode = UIViewContentModeScaleAspectFit;
    [image addSubview:image1];
    [image1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(82);
        make.centerX.equalTo(image);
        make.top.equalTo(image).offset(7);
    }];
    UILabel * la = [[UILabel alloc]init];
    la.text = SQNSLocalString(@"是否删除该收藏内容");
    la.textColor = SQColor333333;
    la.font = FONT_MEDIUM(16);
    [image addSubview:la];
    [la mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(image);
        make.top.equalTo(image1.mas_bottom).offset(13);
    }];
    [self addSubview:self.leftBtn];
    [self addSubview:self.rightBtn];
    [self.leftBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(140);
        make.height.mas_equalTo(48);
        make.bottom.equalTo(image.mas_bottom).offset(-35);
        make.left.equalTo(image).offset(12);
    }];
    [self.rightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(140);
        make.height.mas_equalTo(48);
        make.bottom.equalTo(image.mas_bottom).offset(-35);
        make.right.equalTo(image.mas_right).offset(-12);
    }];
}
- (SQCustomButton *)leftBtn{
    if (!_leftBtn) {
        _leftBtn = [[SQCustomButton alloc]initType:SQCustomButtonTopImageType imageSize:CGSizeMake(0, 0) midmargin:0];
        _leftBtn.text = SQNSLocalString(@"取消");
        _leftBtn.textColor = SQColor333333;
        _leftBtn.font = FONT_MEDIUM(16);
        _leftBtn.layer.cornerRadius = 24;
        _leftBtn.backgroundColor = SQColor(@"#4AF8CE");
    }
    return _leftBtn;
}
- (SQCustomButton *)rightBtn{
    if (!_rightBtn) {
        _rightBtn = [[SQCustomButton alloc]initType:SQCustomButtonTopImageType imageSize:CGSizeMake(0, 0) midmargin:0];
        _rightBtn.text = SQNSLocalString(@"确定");
        _rightBtn.textColor = SQColor333333;
        _rightBtn.font = FONT_MEDIUM(16);
        _rightBtn.layer.cornerRadius = 24;
        _rightBtn.backgroundColor = SQColor(@"#E8E8E8");
    }
    return _rightBtn;
}

@end
